package com.uriuniv.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.uriuniv.domain.Board;
import com.uriuniv.domain.Student;

public class StudentM implements RowMapper {
	
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {

		Student student = new Student();
		student.setStudentId(rs.getString("STUDENT_ID"));	
		student.setEmail(rs.getString("EMAIL"));
		student.setName(rs.getString("NAME"));
		student.setPassword(rs.getString("PASSWORD"));
		student.setTempPassword(rs.getString("TEMP_PASSWORD"));
		student.setPoint(rs.getInt("POINT"));
		student.setJoinDate(rs.getTimestamp("JOIN_DATE"));
		student.setModDate(rs.getTimestamp("MOD_DATE"));
		student.setGroupId(rs.getString("GROUP_ID"));
		student.setUnivId(rs.getString("UNIV_ID"));
		student.setCertification(rs.getString("CERTIFICATION"));
		
		return student;
	}
}
